package service.impl;

import dao.ITreeDao;
import model.Tree;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import service.ITreeService;

import java.util.List;
@Service
public class TreeService implements ITreeService {
    @Autowired
    private ITreeDao iTreeDao;

    @Override
    public List<Tree> list(Tree tree) {
        return iTreeDao.query(tree);
    }

    @Override
    public int insert(Tree tree) {
        return  iTreeDao.insert(tree);
    }

    @Override
    public int update(Tree tree) {
        return  iTreeDao.update(tree);
    }

    @Override
    public int delete(Tree tree) {
        return  iTreeDao.delete(tree);
    }
}
